package com.example.reductionnotice;

import android.view.View;

import android.widget.Button;
import android.widget.ImageView;

import android.widget.TextView;

public class ViewWrapper {

	View base;

	TextView namelabel = null;
	
	TextView valueLabel = null;

	Button deleteBtn = null;

	Button displayBtn = null;
	
	ImageView imageReduction = null;

	ViewWrapper(View base)
	{
		this.base = base;
	}

	TextView getNameView()
	{
		if (namelabel == null)

		{

			namelabel = (TextView) base.findViewById(R.id.name);

		}

		return (namelabel);
	}
	
	TextView getValueView()
	{
		if (valueLabel == null)

		{
			valueLabel = (TextView) base.findViewById(R.id.value);
		}

		return (valueLabel);
	}

	Button getDeleteButton()
	{
		if (deleteBtn == null)
		{
			deleteBtn = (Button) base.findViewById(R.id.delete);
		}
		return (deleteBtn);
	}

	Button getDisplayButton()
	{
		if (displayBtn == null)
		{
			displayBtn = (Button) base.findViewById(R.id.button1);
		}

		return (displayBtn);
	}
	
	ImageView getReductionImage()
	{
		if (imageReduction == null)
		{
			imageReduction = (ImageView) base.findViewById(R.id.imageViewReducetion);
		}

		return (imageReduction);
	}

}